using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScoreManager : MonoBehaviour
{
    public static ScoreManager instance;

    private int score = 0;
    private int distaceScore = 0;
    public int Score => score + distaceScore;

    private void Awake()
    {
        instance = this;
        score = 0;
    }

    public void AddScore(int n)
    {
        score += n;
    }

    private void Update()
    {
        distaceScore = (int)(GameManager.instance.Distance / 20);
    }
}
